package com.icxcc.common.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;

public class SecurityContextUtil {
    @Autowired
    OAuth2ClientContext oAuth2ClientContext;
    @Autowired
    OAuth2RestTemplate oAuth2RestTemplate;
    public static Object getCurrentUser(){

        return SecurityContextHolder.getContext().getAuthentication().getDetails();
    }
}
